﻿@using CMSMVC4.MultiResource
@model System.Data.DataTable
@if (Model != null)
{
    <div class="dichvu_mid_right_bot">
        <div class="dichvu_mid_right_bot_tile">
           @Resource.ReadersComments
        </div>
        <a href="#">
            <div class="dichvu_mid_right_bot_next">
                @Resource.ShowMore
            </div>
        </a>
        @for (var i = 0; i < Model.Rows.Count; i++)
        {
            <div class="dichvu_mid_right_bot_coment">
                <label class="coment_me">
                    <a href="mailto:@Model.Rows[i]["Email"].ToString()" target="_blank">@Model.Rows[i]["Email"].ToString()</a>
                </label>
                <label class="coment_data">
                    @Model.Rows[i]["Data"].ToString()
                </label>
            </div>
        }
    </div>
}
<script type="text/javascript" language="javascript">
        $(function() {
            var page = 1;
            var count = @ViewBag.count;
            $('.dichvu_mid_right_bot_next').click(function(e) {
                e.preventDefault();
                if (page < count) {
                    $.ajax({
                    type: "POST",
                    url: "/Comment/CommentNext" ,
                    data: { id:@ViewBag.id,page:page},//$("#idForm").serialize()
                    success: function(data) {
                        $('.dichvu_mid_right_bot').append(data);
                        page++;
                    }
                });
                }
            });
        });
</script>
